<?php
class Notice extends MY_Controller{

    public function __construct(){
        parent::__construct();
    }
    /**
     * 获取帖子审核列表
     * name: index
     * @Author:taiyang
     */
    public function index(){
        //todo 未想好怎么做待开发
        //todo 未想好怎么做待开发
        //todo 未想好怎么做待开发
        //todo 未想好怎么做待开发
        //todo 未想好怎么做待开发
        //todo 未想好怎么做待开发
        //todo 未想好怎么做待开发

        $post_id=$this->input->get_post('id')?$this->input->get_post('id'):0;
        $uid=$this->input->get_post('uid')?$this->input->get_post('uid'):'';
        $desc=$this->input->get_post('desc')?$this->input->get_post('desc'):'';
        $tag_id=$this->input->get_post('tag_id')?$this->input->get_post('tag_id'):0;

        if($post_id){
            $reportTag = $this->ReportModel->tag;
            //删除逻辑
            $this->PostModel->del_post($post_id);
            //取出帖子信息
            $post_data=$this->PostModel->query_one(array('id'=>$post_id));
            //通知
            $this->NoticeModel->send_notice($post_data['uid'], $uid, 2, 1, $post_id, $reportTag[$tag_id], '');
            echo json_encode(array('status'=>1));exit;
        }

    }

}